package de.widas.gaesf.web;

import org.apache.wicket.Application;
import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.HttpSessionStore;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.session.ISessionStore;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

import de.widas.gaesf.main.MainPage;

/**
 * Created on: 24.09.2009, 15:45:47<br/>
 * Copyright 2009 by WidasConcepts GmbH<br/>
 * 
 * @author Meykel Gruel
 */
public class GAEApplication extends WebApplication {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.wicket.protocol.http.WebApplication#init()
	 */
	@Override
	protected void init() {
		addComponentInstantiationListener(new SpringComponentInjector(this));
		getResourceSettings().setResourcePollFrequency(null);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.wicket.Application#getHomePage()
	 */
	@Override
	public Class<? extends Page> getHomePage() {
		return MainPage.class;
	}
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.wicket.protocol.http.WebApplication#newSessionStore()
	 */
	@Override
	protected ISessionStore newSessionStore() {
		return new HttpSessionStore(this);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.wicket.protocol.http.WebApplication#getConfigurationType()
	 */
	@Override
	public String getConfigurationType() {
		return Application.DEPLOYMENT;
	}

}
